package com.stars.home.utils

import android.content.Context
import android.content.SharedPreferences

/**
 *
 *on 2021/4/1
 */
object MySharedPreferences {

    fun  share(context: Context): SharedPreferences {
        return context.getSharedPreferences("date", Context.MODE_PRIVATE);
    }


    fun setValue(context: Context,key:String,value:Boolean){

        var e=share(context).edit()
        e.putBoolean(key,value)
    }

    fun getValue(context: Context,key:String):Boolean{
        return share(context).getBoolean(key,false)
    }
}


